export default function (state = {} , action) {
  switch(action.type) {
    case 'USER_LOGIN':
      return {
        ...state,
        ...action.payload,
        isLogin: true
      }
      case 'USER_LOGOUT':
        return {
          isLogin: false
        }
      case 'USER_UPDATE':
        return {
          ...state,
          ...action.payload
        }
      default:
        return state
  }
}